$OpenBSD: patch-cmake_FindPostgres_cmake,v 1.5 2014/11/10 16:05:17 landry Exp $
--- cmake/FindPostgres.cmake.orig	Fri Oct 31 15:17:19 2014
+++ cmake/FindPostgres.cmake	Fri Nov  7 14:44:07 2014
@@ -96,7 +96,7 @@ ELSE(WIN32)
         ENDFOREACH(_LIBNAME ${_LIBS})
 
       ELSE (CYGWIN)
-        SET(POSTGRES_LIBRARY ${PG_TMP}/libpq.so CACHE STRING INTERNAL)
+        FIND_LIBRARY(POSTGRES_LIBRARY NAMES pq libpq libpqdll PATHS ${LOCALBASE}/lib)
       ENDIF (APPLE)
     ENDIF(POSTGRES_CONFIG)
 
